/***************************************************************************
 *   Copyright (C) 2009 by Marcin Swiechowicz   *
 *   marcin.swiechowicz@gmail.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef KDCAUDIOVIDEOEDITORMODEL_H
#define KDCAUDIOVIDEOEDITORMODEL_H

#include <QAbstractTableModel>
#include <QList>

#include <kdcmovie.h>

class KDCAudioVideoEditorModel : public QAbstractTableModel
{
public:
	enum Role { role_DiscType = Qt::UserRole + 1, role_AudioCodec = Qt::UserRole + 2, role_StreamMode = Qt::UserRole + 3 };
	enum Column { col_Check = 0, col_Type = 1, col_Mode = 2, col_Codec = 3, col_Channels = 4, col_System = 5, col_Fps = 6, col_Bitrate = 7, col_Ratio = 8, col_Resolution = 9, col_Delay = 10, col_Size = 11 };
	KDCAudioVideoEditorModel( QObject *aParent = 0 );
	~KDCAudioVideoEditorModel();
	
	int rowCount( const QModelIndex &aParent = QModelIndex() ) const;
    QVariant data( const QModelIndex &aIndex, int aRole = Qt::DisplayRole ) const;
	bool setData( const QModelIndex &aIndex, const QVariant &aValue, int aRole = Qt::EditRole );
    QModelIndex parent( const QModelIndex &aIndex ) const;
    int columnCount( const QModelIndex &aParent = QModelIndex() ) const;
    Qt::ItemFlags flags(const QModelIndex &aIndex ) const;
    QVariant headerData( int aSection, Qt::Orientation aOrientation, int aRole = Qt::DisplayRole ) const;
	
	void setMovie( KDCMovie *aMovie );
private:
	KDCMovie *pMovie;
};
#endif
